package com.zhigh.calcite.startproject.adapter;

import com.google.common.collect.ImmutableMap;
import org.apache.calcite.linq4j.tree.Expression;
import org.apache.calcite.schema.SchemaPlus;
import org.apache.calcite.schema.Table;
import org.apache.calcite.schema.impl.AbstractSchema;
import org.checkerframework.checker.nullness.qual.Nullable;

import java.util.Map;

public class MemSchema extends AbstractSchema {

    private final String name;

    private final SchemaPlus parentSchema;

    private final Map<String, Table> tableMap;

    private final TableDataType tableDataType;

    private final Map<String, Object> operand;


    public MemSchema(String name, SchemaPlus parentSchema, Map<String, Object> operand) {
        this.name = name;
        this.parentSchema = parentSchema;
        this.operand = operand;
        String tableDataTypeStr = (String) operand.get("tableDataType");
        this.tableDataType = TableDataType.valueOf(tableDataTypeStr);
        this.tableMap = ImmutableMap.of();

    }

    @Override
    protected Map<String, Table> getTableMap() {
        return tableMap;
    }

}


